package com.teamone.etl.admin.feign.fallback;

import com.baomidou.mybatisplus.extension.api.R;
import com.github.pagehelper.PageInfo;
import com.teamone.etl.admin.feign.EnterpriseWebService;
import com.teamone.etl.enterprise.entity.AlarmPhone;
import com.teamone.etl.enterprise.entity.Enterprise;
import com.teamone.etl.enterprise.request.EnterpriseRequest;
import com.teamone.etl.exception.CommonCode;
import com.teamone.etl.exception.CustomException;
import java.util.List;
import org.springframework.web.multipart.MultipartFile;

/**
 @author WangZhuoRan */
public class EnterpriseWebServiceFallBackImpl implements EnterpriseWebService {

    /**
     Web层Feign调用Enterprise 分页查询
     @param request 请求参数封装类
     @return 分页后结果集
     @throws CustomException 自定义异常
     */
    @Override
    public R<PageInfo<Enterprise>> getEnterpriseList (EnterpriseRequest request) throws CustomException {
        throw new CustomException(CommonCode.SERVER_ERROR);
    }

    /**
     Web层Feign调用Enterprise 修改
     @param request 请求参数封装类
     @return 受影响行数
     @throws CustomException 二次校验自定义异常
     */
    @Override
    public R<Boolean> updateEnterprise (EnterpriseRequest request) throws CustomException {
        throw new CustomException(CommonCode.SERVER_ERROR);
    }

    /**
     Web层Feign调用Enterprise 添加
     @param request 请求参数封装类
     @return 受影响行数
     @throws CustomException 二次校验自定义异常
     */
    @Override
    public R<Boolean> addEnterprise (EnterpriseRequest request, Integer flag) throws CustomException {
        throw new CustomException(CommonCode.SERVER_ERROR);
    }

    /**
     Web层Feign调用Enterprise 上传营业执照
     @param file 营业执照
     @return url地址
     @throws CustomException 自定义异常
     */
    @Override
    public R<String> uploadLicenseImage (MultipartFile file) throws CustomException {
        throw new CustomException(CommonCode.SERVER_ERROR);
    }

    /**
     Web层Feign调用Enterprise 上传企业图片/头像
     @param file 企业图片/头像
     @return url地址
     @throws CustomException 自定义异常
     */
    @Override
    public R<String> uploadEnterpriseImage (MultipartFile file) throws CustomException {
        throw new CustomException(CommonCode.SERVER_ERROR);
    }

    /**
     预警电话列表
     @param enterpriseId 企业id
     @return 预警电话列表
     @throws CustomException 自定义异常
     */
    @Override
    public R<List<AlarmPhone>> getAlarmList (Integer enterpriseId) throws CustomException {
        throw new CustomException(CommonCode.SERVER_ERROR);
    }

    /**
     添加预警电话
     @param alarmPhone 要添加的信息
     @return 成功/失败
     @throws CustomException 自定义异常
     */
    @Override
    public R<Boolean> addAlarm (AlarmPhone alarmPhone) throws CustomException {
        throw new CustomException(CommonCode.SERVER_ERROR);
    }

    /**
     删除预警电话
     @param id 要删除的数据的主键id
     @return 成功/失败
     @throws CustomException 自定义异常
     */
    @Override
    public R<Boolean> deleteAlarm (Integer id) throws CustomException {
        throw new CustomException(CommonCode.SERVER_ERROR);
    }

}
